<?php
session_start();
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/database.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/functions.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/class.admin.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/class.modules.php');
$admin=new admin();
$admin->canView($_SERVER['PHP_SELF']);

$file=$_FILES['module']['tmp_name'];
$filename=$_FILES['module']['name'];
$module=new module();
if($module->install($file,$filename)) {
	$installed=true;	
} else {
	$installed=false;	
}
?>
<script>
parent.clickModules();
</script>